#Align ion beam to electron beam using beamshift
setctrlbeam cntrlbeam
setpatbeam patbeam
setpatinfo markdepth, mattype
stagemove x, (x0 - 0.025)
run aligncross22.mil
mill
clear
dialog 0,"Alignment Correction - 2nd Step","Move stage to cross position using the electron beam for imaging."
getstagepos
#correct beam shift
xshift = (movex - x) * 1000
yshift = (y0 - y) * 1000
getbeamshift
setbeamshift xbeam - xshift, ybeam-yshift
error = result